//package com;
//
//import java.net.InetAddress;
//import java.net.UnknownHostException;
//import java.util.List;
//
//import org.apache.logging.log4j.LogManager;
//import org.apache.logging.log4j.Logger;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.boot.SpringApplication;
//import org.springframework.boot.autoconfigure.SpringBootApplication;
//import org.springframework.context.ConfigurableApplicationContext;
//import org.springframework.core.env.Environment;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
//import com.alibaba.fastjson.JSON;
//import com.linkstec.pojo.User;
//import com.linkstec.service.UserServiceImpl;
//import com.linkstec.util.SpringContextUtil;
//
//@RestController
//@SpringBootApplication(exclude = DruidDataSourceAutoConfigure.class)
//public class DemoApplication {
//
//    @Value("${com.demo.name}")
//    private String name;
//
//    @Value("${com.demo.url}")
//    private String url;
//    
//    @Value("${redis.hostAndPort}")
//	private String hostAndPort;
//    
//    @Value("${redis.redisPassWord}")
//	private String redisPassWord;
//    
//    @RequestMapping("/index")
//    public String index(){
//        return "name：" + name +"，url：" + url +hostAndPort+redisPassWord;
//    }
//    private static final Logger logger = LogManager.getLogger();
//    public static void main(String[] args) {
//    	
//    	ConfigurableApplicationContext application = SpringApplication.run(DemoApplication.class, args);
//        UserServiceImpl userServiceImpl = SpringContextUtil.getBean("userServiceImpl");
//        try {
//        	List<User> list = userServiceImpl.getUser();
//        	System.out.println(JSON.toJSONString(list));
//			System.out.println(list);
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//        Environment env = application.getEnvironment();
//        String ip;
//		try {
//			ip = InetAddress.getLocalHost().getHostAddress();
//        String port = env.getProperty("server.port");
////        String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
//        String path = "";
//        logger.info("\n----------------------------------------------------------\n\t" +
//                "Application Jeecg-Boot is running! Access URLs:\n\t" +
//                "Local: \t\thttp://localhost:" + port + path + "/\n\t" +
//                "External: \thttp://" + ip + ":" + port + path + "/\n\t" +
//                "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
//                "----------------------------------------------------------");
//		} catch (UnknownHostException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//    }
//}